package org.miyuki4j.cfgtool;

import lombok.Getter;

/**
 * @Desc 运行模式
 * @Author miyuki4j
 * @Date 2025/7/28/星期一 17:27
 * @Version 1.0
 */
@Getter
public enum RunModeEnum {

    COMMAND("command", "命令行模式启动"),

    GUI("gui", "gui模式启动"),

    WEB("web", "web模式启动"),

    ;

    private final String mode;
    private final String desc;

    RunModeEnum(String mode, String desc) {
        this.mode = mode;
        this.desc = desc;
    }

    public boolean match(String mode) {

        return StringUtils.equalsIgnoreCase("-" + this.mode, mode);
    }

    public String usage() {
        return "-" + mode + ": " + desc;
    }
}
